package operation.iterator.obj.iterators;

import java.util.Iterator;
import java.util.List;

import operation.iterator.abs.ICollege;
import operation.iterator.obj.Department;

public class ArtCollegeIterator implements Iterator<Department> {
    List<Department> departments;
    int index = -1;

    public ArtCollegeIterator(List<Department> departments) {
        this.departments = departments;
    }

    @Override
    public boolean hasNext() {
        return index < departments.size() - 1;
    }

    @Override
    public Department next() {
        return departments.get(++index);
    }

    @Override
    public void remove() {
    }
}